import request from '@/utils/request';

/** 
 * @package 已采购订单列表
 */
export const getPurchasedOrdersListApi = (data: any) => {
    return request({
        url: '/system/purchaseInRecord/purchasedOrders',
        method: 'post',
        data: data
    });
};

/**
 * @package 申请对账
 */

export const applyReconciliationApi = (data: any) => {
    return request({
        url: '/system/purchaseInRecord/batchReconciliation',
        method: 'post',
        data: data
    });
};

/**
 * @package 撤销对账
 */
export const purchaseCancelReconciliationApi = (data: any) => {
    return request({
        url: '/system/purchaseInRecord/revokeReconciliation',
        method: 'put',
        params: data
    });
};

/**
 * @package 已采购列表 撤销入库
 */

export const cancelInboundApi = (id: any) => {
    return request({
        url: '/system/purchaseInRecord/revokeInRecord',
        method: 'DELETE',
        params: { id }
    });
};


/**
 * @package 获取采购入库记录详细信息
 */

export const getPurchaseDetailsApi = (id: any) => {
    return request({
        url: `/system/purchaseInRecord/${id}`,
        method: 'get',
    });
};
